myApp.config(function ($stateProvider, $urlRouterProvider, $locationProvider,$httpProvider) {
	//全局路由转义变量;
	/*$httpProvider.defaults.transformRequest = function(obj){
	  var str = [];
	  for(var p in obj){
		str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
	  }
	  return str.join("&");
	};
	$httpProvider.defaults.headers.post = {
	  'Content-Type': 'application/x-www-form-urlencoded'
	};
	$httpProvider.defaults.headers.delete = {
	  'Content-Type': 'application/x-www-form-urlencoded'
	};*/
	
	$urlRouterProvider.otherwise('/list');
	
	// $httpProvider.interceptors.push('UserInterceptor');
	$stateProvider
		.state('list', {
			url: '/list',
			templateUrl: 'html/list/list.html',
			controller : 'listCtrl'
		})
		.state('inspectionTemplateList', {
			url: '/inspectionTemplateList',
			templateUrl: 'html/inspectionTemplateList/list.html',
			controller : 'inspectionTemplateListCtrl'
		})
		.state('inspectionContentList', {
			url: '/inspectionContentList',
			templateUrl: 'html/inspectionContentList/list.html',
			controller : 'inspectionContentListCtrl'
		});

	
	$locationProvider.html5Mode({
		enable: true,
		requireBase: false
	});
	
});
